package com.lecture.java8.date;

import cn.hutool.core.img.ImgUtil;

import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;

/**
 * @author luyn
 * @version 1.0
 * @description
 * @date 2020/12/23 9:09
 */
public class Test {
    public static void main(String[] args) {
        try {
            BufferedImage image = ImageIO.read(new File("D:\\workspace\\2023深能\\1713853165641.jpg"));
            System.out.println(image.getWidth());
            System.out.println(image.getHeight());

            Image scale = ImgUtil.scale(image, 0.0389f);
            ImgUtil.toBase64(scale,"");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
